package com.example.core.interceptor;

import com.example.core.utils.ServletUtils;
import feign.RequestInterceptor;
import feign.RequestTemplate;

public class TokenFeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        String authorization = ServletUtils.getRequest().getHeader("Authorization");
        requestTemplate.header("Authorization", authorization);
    }
}
